package com.patterns.builder;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author Tanyu
 * @Date 2020/6/2 10:32
 * @Description 浅拷贝
 * @Version 1.0
 */
public class Sheep implements Cloneable, Serializable {
  //1997,英国的克隆羊，多利！
  private String sname;
  private Date birthday;

  @Override
  protected Object clone() throws CloneNotSupportedException {
    //直接调用object对象的clone()方法！
    return super.clone();
  }

  public Sheep() {
  }

  public Sheep(String sname, Date birthday) {
    this.sname = sname;
    this.birthday = birthday;
  }

  public String getSname() {
    return sname;
  }

  public void setSname(String sname) {
    this.sname = sname;
  }

  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }
}
